#!/usr/bin/env python 3.9
# -*- coding = utr-8 -*-
'''
@Project: DouBan
@File: testUrllib_GET.py
@IDE: PyCharm
@Author: Simon
@Date: 5/2/21  11:42 PM
'''

from urllib.request import urlopen, Request

url = 'https://movie.douban.com/top250?start=%s&filter='
headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36'}

# 58 City
# url2 = 'https://zh.58.com/searchjob.shtml?spm=31749658231.zhaopin_360&utm_source=1234'
# headers2 = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36'}

# Original get Requirement
ret = Request(url, headers=headers)
# ret = Request(url2, headers=headers2)
res = urlopen(ret)
aa = res.read().decode('utf-8')
print(aa)


